import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
          colorScheme: const ColorScheme(
              primary: Colors.black,
              surfaceVariant: Colors.white,
              secondary: Colors.green,
              background: Colors.white, //整个页面背景色
              error: Colors.red,
              brightness: Brightness.light,
              onBackground: Colors.white,
              outlineVariant: Colors.white,
              onError: Colors.yellow,
              onPrimary: Colors.white,
              onSecondary: Colors.white,
              onSurface: Color.fromARGB(255, 233, 233, 240),
              surface: Color.fromARGB(255, 17, 0, 255)) //整个标题栏颜色
          // primarySwatch: Colors.blue, // 设置主色调,无效，怎么设都是白色
          ),
      home: Scaffold(
        appBar: AppBar(title: const Text("图标"), centerTitle: true),
        body: const MyHomePage(),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: const <Widget>[
        ListTile(
            leading: Icon(
              Icons.home,
              color: Colors.amber,
            ),
            title: Text("首页",
                style: TextStyle(
                    color: Color.fromARGB(255, 247, 46, 247), fontSize: 20))),
        Divider(
          color: Colors.amber,
          thickness: 0.5,
          indent: 10.0,
          endIndent: 1.0,
        ),
        ListTile(
            leading: Icon(Icons.assessment, color: Colors.cyanAccent),
            title: Text("全部订单", style: TextStyle(color: Colors.blue))),
        Divider(
          color: Colors.amber,
          thickness: 0.5,
          indent: 10.0,
          endIndent: 1.0,
        ),
        ListTile(
          leading: Icon(Icons.payment, color: Colors.green),
          title: Text("待付款", style: TextStyle(color: Colors.red)),
          trailing: Icon(
            Icons.arrow_right_sharp,
            color: Colors.grey,
          ),
        ),
        Divider(
          color: Colors.amber,
          thickness: 0.5,
          indent: 10.0,
          endIndent: 1.0,
        ),
        ListTile(
          leading: Icon(Icons.payment, color: Colors.yellow),
          title: Text("收藏",
              style: TextStyle(color: Color.fromARGB(255, 56, 180, 60))),
          trailing: Icon(
            Icons.arrow_right_sharp,
            color: Colors.black,
          ),
        ),
        Divider(
          color: Colors.amber,
          thickness: 0.5,
          indent: 10.0,
          endIndent: 1.0,
        ),
        ListTile(
            leading: Icon(Icons.safety_check, color: Colors.brown),
            title: Text("客服", style: TextStyle(color: Colors.cyan))),
        Divider(
          color: Colors.amber,
          thickness: 0.5,
          indent: 10.0,
          endIndent: 1.0,
        ),
      ],
    );
  }
}
